
import AESEncryptor from '@/utils/aesCrypt.js';

const key = '1234567890abcdef'; // 密钥
const text = 'uniapp AES加密测试';

// 主方法测试
const encrypted = AESEncryptor.encryptAESWithPlainText(text, key);
const decrypted = AESEncryptor.decryptAESWithCipherText(encrypted, key);
console.log('主方法原文:', text);
console.log('主方法加密:', encrypted);
console.log('主方法解密:', decrypted);

// 备用方法测试
const encText = AESEncryptor.encryptAESWithText(text, key);
const decText = AESEncryptor.decryptAESWithText(encText, key);
console.log('备用方法加密:', encText);
console.log('备用方法解密:', decText);